05 - Accelerometer
Overview
The accelerometer sensor can provide numerical feedback on the acceleration of the three axes. When the development board is stationary relative to the earth, the vector acceleration under this condition is the acceleration of gravity of the earth.
How to Use
Blocks Introduction
Programming Blocks | Functional Introduction |
---|---|
Returns acceleration values in X, Y, and Z axes, with a range of -2~2 (in g unit) | |
Returns simple attitude angles - Pitch: range -90~90 - Roll: range -90~90 | |
Attitude detection, if the current Grapeboard is in the specified state, the block returns true after execution |
Case 1: Race Walk Foul Detection
- Effect: The Grove board will emit an alert when the athlete's movements are too large.
Programming Blocks
Case 2 - Sitting Posture Detection
Effect: Place the micro:bit on your head, if your sitting posture is incorrect, it will sound a reminder~
Program blocks
Case3 - Keep balance
Effect: Keep the LED light to maintain the brightness
Program block diagram